﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <!-- Resource dictionary entries should be defined here. -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colors.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource Application_Control_Foreground}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{DynamicResource TabControlTemplate}"/>
    </Style>

    <ControlTemplate x:Key="TabControlTemplate" TargetType="TabControl">
        <Grid>
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition/>
        	</Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="20"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
			
            <Border Grid.Row="1" CornerRadius="0,5,0,0" Grid.ColumnSpan="1" Grid.Column="1">
            	<Border.Background>
            		<SolidColorBrush Color="{StaticResource Application_TabControl_Background}"/>
            	</Border.Background>
            	<ContentPresenter ContentSource="SelectedContent" Margin="1"/>
            </Border>
            <TabPanel Grid.Row="0" IsItemsHost="true"/>
        </Grid>
    </ControlTemplate>
</ResourceDictionary>